{% extends "learning_logs/base.html" %}

{% block header %}
    <h3>{{ topic.text }}</h3>
{% endblock header %}

{% block content %}
    
    {% for entry in entries %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3>
                    {{ entry.date_added|date:"Y-m-d" }}
                    <small>
                        <a href="{% url 'learning_logs:edit_entry' entry.id %}">编辑</a>
                    </small>
                    <small><a href="{% url 'learning_logs:add_comment' entry.id  %}">评论</a></small>
                </h3>
                <div class="panel-body">
                    {{ entry.text|linebreaks }}                    
                </div>
                <small><a href="{% url 'learning_logs:comment' entry.id  %}">查看评论</a></small>
            </div>
        </div>
    {% endfor %}
    <small><a href="{% url 'learning_logs:new_entry' topic.id %}">添加条目</a></small>
    
{% endblock content %}